#include "ISNW_RenderHandler.h"
#include "../ISNW_ScreenManager/ISNW_ScreenManager.h"
#include "../../ISNW_Scene/SceneManager.h"
using namespace ISNW;

namespace ISNW
{
	ISNW_RenderHandler* g_pRenderHandler = ISNW_NULL;
}

ISNW_RenderHandler::ISNW_RenderHandler()
{

}

ISNW_RenderHandler::~ISNW_RenderHandler()
{

}

ISNW_RenderHandler* ISNW_RenderHandler::GetPtr()
{
	static ISNW_RenderHandler sInstance;
	return &sInstance;
}

ISNW_VOID ISNW_RenderHandler::InitRenderHandler()
{
	g_pRenderHandler = GetPtr();
}

ISNW_VOID ISNW_RenderHandler::DISPATCHRENDEREVENT()
{
	g_pRenderHandler->DispatchRenderEvent();
}

ISNW_VOID ISNW_RenderHandler::DispatchRenderEvent()
{
	g_pScreenManager->GetCurrentScreen()->Render();
	g_pIME->Render();

	scene::g_pSceneManager->drawall();
}